// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import Vuex from 'vuex';
import VueI18n from 'vue-i18n';
import _ from 'underscore';

import App from './views/App';
import Vuego from './vuego';
import router from './router';
import messages from './i18n';

Vue.config.productionTip = false;


Vue.use(VueI18n);
Vue.use(Vuex);
Vue.use(Vuego);

const i18n = new VueI18n({
  locale: 'zh-CN', // set locale
  messages, // set locale messages
});

/* eslint-disable no-new */
const VueModule = new Vue({
  el: '#app',
  router,
  i18n,
  template: '<App/>',
  components: { App },
});

window._ = _;

export { i18n };

export default VueModule;
